package com.oceanread.cn.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oceanread.cn.entity.Photography;
import com.oceanread.cn.entity.Treelist2;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PhotographyMapper extends BaseMapper<Photography> {
    List<Photography> getall();

    List<Photography> query(@Param("key") String key, @Param("value") String value);

    List<Photography> getTablelist(@Param("start") int start, @Param("end") int end);

    List<Photography> getTablelistquery(@Param("key") String key, @Param("value") String value, @Param("start") int start,
                                        @Param("end") int end);

    Integer getnum();

    Integer getnumquery(@Param("key") String key, @Param("value") String value);

    Integer update(@Param("sysid") int sysid,
                   @Param("pId") String pId,
                   @Param("id") String id,
                   @Param("name") String name,
                   @Param("path") String path,
                   @Param("type") String type,
                   @Param("typeroot") String typeroot,
                   @Param("open") String open,
                   @Param("influencechild") String influencechild,
                   @Param("region") String region,
                   @Param("X") String X,
                   @Param("Y") String Y,
                   @Param("CameraHight") String CameraHight
    );

    @SqlParser(filter = true)
    Integer insert(
            @Param("pId") String pId,
            @Param("id") String id,
            @Param("name") String name,
            @Param("path") String path,
            @Param("type") String type,
            @Param("typeroot") String typeroot,
            @Param("open") String open,
            @Param("influencechild") String influencechild,
            @Param("region") String region,
            @Param("X") String X,
            @Param("Y") String Y,
            @Param("CameraHight") String CameraHight
    );

    Integer delete(@Param("sysid") int sysid);

}
